function searchReading(keyword:String, type:String)
{
	var myDP = new Array({bookName:"Chris", authorName:"Priceless"}, {bookName:"Nigel", authorName:"Cheap"}, {bookName:"Kobe", authorName:"Nice"});
	return myDP;
}

function getReadingItem(readingInfo:Object, index:Number):String
{
	//trace("getReadingItem...");
	var cont:String="<moonlight name='ReadingBrowser' template='ReadingBrowser-container' uri='app/ReadingBrowser.xml'>"
	+"<portlet name="+"'item_"+readingInfo.id+"' drag='no' style='no' height='25'>";
	
	cont+="<hotspot name='bg_"+readingInfo.id+"' x='0' y='1' alpha='0' width='558' height='20'></hotspot>"
	+"<textfield name='bookName_"+readingInfo.id+"' x='1' y='1' html='true' selectable='no' width='150' height='20'>"+readingInfo.bookName+"</textfield>"
	+"<textfield name='authorName_"+readingInfo.id+"' x='151' y='1' html='true' selectable='no' width='80' height='20'>"+readingInfo.authorName+"</textfield>"
	+"<textfield name='readerName_"+readingInfo.id+"' x='231' y='1' html='true' selectable='no' width='80' height='20'>"+readingInfo.readerName+"</textfield>"
	+"<textfield name='audioDuration_"+readingInfo.id+"' x='311' y='1' html='true' selectable='no' width='50' height='20'>"+readingInfo.audioDuration+"</textfield>";

	cont+="<media x='380' y='4' name='rplay#"+readingInfo.id+"' type='image' src='app/rplay.swf'/>"
	//+"<media x='405' y='4' name='record#"+readingInfo.id+"' type='image' src='app/record.swf'/>"
	+"<media x='410' y='4' name='text#"+readingInfo.id+"' type='image' src='app/text.swf'/>"
	+"<media x='440' y='4' name='mp3#"+readingInfo.id+"' type='image' src='app/mp3.swf'/>"
	+"<media x='470' y='4' name='mobile#"+readingInfo.id+"' type='image' src='app/mobile.swf'/>";

	cont+="<handler ins='ReadingBrowser-bg_"+readingInfo.id+"' type='onPress' value='bg' src='lib:notes.components.ReadingBrowser.clickItem' />"
	+"<handler ins='ReadingBrowser-rplay#"+readingInfo.id+"-media_rplay#"+readingInfo.id+"-rplay' type='onPress' value='play' src='lib:notes.components.ReadingBrowser.playReading' />"
	+"<handler ins='ReadingBrowser-rplay#"+readingInfo.id+"-media_rplay#"+readingInfo.id+"-rplay' type='onRollOver' value='play' src='lib:notes.components.ReadingBrowser.hintOn' />"
	+"<handler ins='ReadingBrowser-rplay#"+readingInfo.id+"-media_rplay#"+readingInfo.id+"-rplay' type='onRollOut' value='play' src='lib:notes.components.ReadingBrowser.hintOff' />";
	//+"<handler ins='ReadingBrowser-rplay#"+readingInfo.id+"-media_rplay#"+readingInfo.id+"-rplay' type='onReleaseOutside' value='play' src='lib:notes.components.ReadingBrowser.hintOff' />";

	//cont+="<handler ins='ReadingBrowser-record#"+readingInfo.id+"-media_record#"+readingInfo.id+"-record' type='onPress' value='record' src='lib:notes.components.ReadingBrowser.recordReading' />"
	//+"<handler ins='ReadingBrowser-record#"+readingInfo.id+"-media_record#"+readingInfo.id+"-record' type='onRollOver' value='record' src='lib:notes.components.ReadingBrowser.hintOn' />"
	//+"<handler ins='ReadingBrowser-record#"+readingInfo.id+"-media_record#"+readingInfo.id+"-record' type='onRollOut' value='record' src='lib:notes.components.ReadingBrowser.hintOff' />"
	//+"<handler ins='ReadingBrowser-record#"+readingInfo.id+"-media_record#"+readingInfo.id+"-record' type='onReleaseOutside' value='record' src='lib:notes.components.ReadingBrowser.hintOff' />";
	
	cont+="<handler ins='ReadingBrowser-text#"+readingInfo.id+"-media_text#"+readingInfo.id+"-text' type='onPress' value='text' src='lib:notes.components.ReadingBrowser.downloadText' />"
	+"<handler ins='ReadingBrowser-text#"+readingInfo.id+"-media_text#"+readingInfo.id+"-text' type='onRollOver' value='text' src='lib:notes.components.ReadingBrowser.hintOn' />"
	+"<handler ins='ReadingBrowser-text#"+readingInfo.id+"-media_text#"+readingInfo.id+"-text' type='onRollOut' value='text' src='lib:notes.components.ReadingBrowser.hintOff' />";
	//+"<handler ins='ReadingBrowser-text#"+readingInfo.id+"-media_text#"+readingInfo.id+"-text' type='onReleaseOutside' value='text' src='lib:notes.components.ReadingBrowser.hintOff' />";
	
	cont+="<handler ins='ReadingBrowser-mp3#"+readingInfo.id+"-media_mp3#"+readingInfo.id+"-mp3' type='onPress' value='mp3' src='lib:notes.components.ReadingBrowser.downloadMp3' />"
	+"<handler ins='ReadingBrowser-mp3#"+readingInfo.id+"-media_mp3#"+readingInfo.id+"-mp3' type='onRollOver' value='mp3' src='lib:notes.components.ReadingBrowser.hintOn' />"
	+"<handler ins='ReadingBrowser-mp3#"+readingInfo.id+"-media_mp3#"+readingInfo.id+"-mp3' type='onRollOut' value='mp3' src='lib:notes.components.ReadingBrowser.hintOff' />";
	//+"<handler ins='ReadingBrowser-mp3#"+readingInfo.id+"-media_mp3#"+readingInfo.id+"-mp3' type='onReleaseOutside' value='mp3' src='lib:notes.components.ReadingBrowser.hintOff' />";
	
	cont+="<handler ins='ReadingBrowser-mobile#"+readingInfo.id+"-media_mobile#"+readingInfo.id+"-mobile' type='onPress' value='mobile' src='lib:notes.components.ReadingBrowser.downloadMobile' />"
	+"<handler ins='ReadingBrowser-mobile#"+readingInfo.id+"-media_mobile#"+readingInfo.id+"-mobile' type='onRollOver' value='mobile' src='lib:notes.components.ReadingBrowser.hintOn' />"
	+"<handler ins='ReadingBrowser-mobile#"+readingInfo.id+"-media_mobile#"+readingInfo.id+"-mobile' type='onRollOut' value='mobile' src='lib:notes.components.ReadingBrowser.hintOff' />";
	//+"<handler ins='ReadingBrowser-mobile#"+readingInfo.id+"-media_mobile#"+readingInfo.id+"-mobile' type='onReleaseOutside' value='mobile' src='lib:notes.components.ReadingBrowser.hintOff' />";

	cont+="</portlet></moonlight>";
	//trace("cont..."+cont);
	return cont;
}

function searchBook(keyword:String, type:String)
{
	var myDP = new Array({bookName:"Chris", authorName:"Priceless"}, {bookName:"Nigel", authorName:"Cheap"}, {bookName:"Kobe", authorName:"Nice"});
	return myDP;
}

function getBookItem(book:Object, index:Number):String
{
	//trace("getBookItem...");
	var cont:String="<moonlight name='TaskPaper' template='TaskPaper-container' uri='app/TaskPaper.xml'>"
	+"<portlet name="+"'bookItem_"+book.id+"' drag='no' style='no' height='25'>";
	
	cont+="<hotspot name='bookBg_"+book.id+"' x='1' y='1' alpha='0' width='556' height='20'></hotspot>"
	+"<textfield name='bookName_"+book.id+"' x='1' y='1' html='true' selectable='no' width='360' height='20'>"+book.bookName+"</textfield>"
	+"<textfield name='authorName_"+book.id+"' x='361' y='1' html='true' selectable='no' width='150' height='20'>"+book.authorName+"</textfield>"

	//cont+="<media x='340' y='4' name='record_"+book.id+"' type='image' src='app/rb_record.png'/>";

	cont+="<handler ins='TaskPaper-bookBg_"+book.id+"' type='onPress' value='bg' src='lib:notes.components.readingRecorder.TaskPaper.clickItem' />"
	//+"<handler ins='TaskPaper-record_"+book.id+"' type='onPress' value='record' src='lib:notes.components.readingRecorder.TaskPaper.recordReading' />";

	cont+="</portlet></moonlight>";
	//trace("cont..."+cont);
	return cont;
}
